<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="/favicon.ico" >
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="__PUBLIC__/admin/lib/html5shiv.js"></script>
    <script type="text/javascript" src="__PUBLIC__/admin/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/static/h-ui.admin/css/style.css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="__PUBLIC__/admin/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <script type="text/javascript" src="__PUBLIC__/admin/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/admin/js/action.js"></script>
    <title>{$title}</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> {$modules} <span class="c-gray en">&gt;</span> {$title}
</nav>
<div class="page-container">
    <form class="form form-horizontal" action="{:U('savePushIndex')}" method="post">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>活动选择：</label>
            <div class="formControls col-xs-8">
                <select class="inp_1 input-text" id="object_type" name="object_type" style="width: 120px">
                    <option value="">请选择类型</option>
                    <volist name="type" id="vo" key="k">
                        <option value="{$k}" <if condition="$info.object_type eq $k ">selected="selected"</if>>{$vo}</option>
                    </volist>
                </select>
                <select class="inp_1 input-text" id="object_id" name="object_id" style="width: 420px">
                    <option value="">请选择活动</option>
                    <volist name="list" id="vo" key="k">
                        <option value="{$vo.id}" <if condition="$info.object_id eq $vo.id ">selected="selected"</if>>{$vo.title}</option>
                    </volist>
                </select>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>排序：</label>
            <div class="formControls col-xs-8">
                <input type="text" class="input-text" placeholder="数字，从小到大" name="sort" id="sort" value="<?php echo $info['sort']; ?>">
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="submit" name="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
            </div>
        </div>
    </form>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="__PUBLIC__/admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__PUBLIC__/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/lib/laypage/1.2/laypage.js"></script>
<script>
    $(function () {
        $("#object_type").change(function () {
            var type = $(this).val();
            $.ajax({
                type: "GEY",
                url: "/index.php/Admin/Guanggao/ajaxGetObject.html?type=" + type ,
                dataType: "json",
                success: function(res){
                    var html = '<option value="0">请选择活动</option>';
                    for(var i=0; i<res.length; i++){
                        html += '<option value="'+res[i].id+'">'+res[i].title+'</option>';
                    }
                    $("#object_id").html(html);
                }
            });
        })
    })
</script>
</body>
</html>
